package com.lyn.tencent_health_code.entity;

import com.alibaba.fastjson.JSON;

/**
 * @author almost
 */
public class HealthCodeToken {
    private String appToken;
    private int expiresIn;

    @Override
    public String toString() {
        return JSON.toJSONString(this);
    }

    //<editor-fold defaultstate="collapsed" desc="delombok">
    @SuppressWarnings("all")
    public HealthCodeToken() {
    }

    @SuppressWarnings("all")
    public String getAppToken() {
        return this.appToken;
    }

    @SuppressWarnings("all")
    public int getExpiresIn() {
        return this.expiresIn;
    }

    @SuppressWarnings("all")
    public void setAppToken(final String appToken) {
        this.appToken = appToken;
    }

    @SuppressWarnings("all")
    public void setExpiresIn(final int expiresIn) {
        this.expiresIn = expiresIn;
    }

    @Override
    @SuppressWarnings("all")
    public boolean equals(final Object o) {
        if (o == this) return true;
        if (!(o instanceof HealthCodeToken)) return false;
        final HealthCodeToken other = (HealthCodeToken) o;
        if (!other.canEqual((Object) this)) return false;
        if (this.getExpiresIn() != other.getExpiresIn()) return false;
        final Object this$appToken = this.getAppToken();
        final Object other$appToken = other.getAppToken();
        if (this$appToken == null ? other$appToken != null : !this$appToken.equals(other$appToken)) return false;
        return true;
    }

    @SuppressWarnings("all")
    protected boolean canEqual(final Object other) {
        return other instanceof HealthCodeToken;
    }

    @Override
    @SuppressWarnings("all")
    public int hashCode() {
        final int PRIME = 59;
        int result = 1;
        result = result * PRIME + this.getExpiresIn();
        final Object $appToken = this.getAppToken();
        result = result * PRIME + ($appToken == null ? 43 : $appToken.hashCode());
        return result;
    }
    //</editor-fold>
}
